import request from "@/common/request/ajax.js";


export function targetInfo(data) {
	return request({
		url: '/business/statistics/main',
		method: 'GET',
		query: data
	})
}

export function getPerformance(data) {
	return request({
		url: '/business/statistics/performance',
		method: 'GET',
		query: data
	})
}

export function targetEcharts(data) {
	return request({
		url: '/business/statistics/monthly',
		method: 'GET',
		query: data
	})
}

//填写店铺资料
export function shopinfoForm(data) {
	return request({
		url: '/business/intention/create',
		method: 'POST',
		data
	})
}

//商务数据详情
export function dataDetail(params) {
	return request({
		url: '/business/statistics/detail',
		method: 'GET',
		params
	})
}

//访问记录添加
export function visitLogAdd(data) {
	return request({
		url: '/business/my/visit/add',
		method: 'POST',
		data
	})
}
//访问记录列表
export function visitLogList(params) {
	return request({
		url: '/business/my/visit',
		method: 'GET',
		params
	})
}

//我发展的商户
export function myBusinessList(params) {
	return request({
		url: '/business/my/merchants',
		method: 'GET',
		params
	})
}

//我的团队
export function myTeamList(params) {
	return request({
		url: '/business/my/team',
		method: 'GET',
		params
	})
}
//商户入驻分类
export function getBusinessCate(params) {
	return request({
		url: '/business/intention/cate',
		method: 'GET',
		params
	})
}

//商户入驻店铺分类
export function getBusinessType(params) {
	return request({
		url: '/business/intention/type',
		method: 'GET',
		params
	})
}

//排行榜
export function getRankList(params) {
	return request({
		url: '/business/statistics/ranking',
		method: 'GET',
		params
	})
}

/**
 * 协议政策
**/
export function protocolRule(key) {
	return request.get(`api/agreement/${key}`, {}, {
		noAuth: true
	});
}